/*
 * @Date: 2022-04-25 09:36:28
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-04-28 11:27:51
 * @FilePath: \Vue3-ts-cms\src\api\main\system\system.ts
 * @description: 文件描述
 */
import YXRequest from '@/service/index'
import { IDataType } from '../../type'

export function getPageListData(url: string, queryInfo: any) {
  return YXRequest.post<IDataType>({
    url: url,
    data: queryInfo
  })
}

// url: /users/id
export function deletePageData(url: string) {
  return YXRequest.delete<IDataType>({
    url: url
  })
}

export function createPageData(url: string, newData: any) {
  return YXRequest.post<IDataType>({
    url: url,
    data: newData
  })
}

export function editPageData(url: string, editData: any) {
  return YXRequest.patch<IDataType>({
    url: url,
    data: editData
  })
}
